/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.sim.dto.general;

import cn.iot.card.open.constants.Constants;

/**
 * 单卡APN功能 DTO
 */
public class SimAPNFunctionDTO extends SimFunctionDTO {

    /**
     * 所要办理的APN Name
     */
    private String apnName;

    public String getApnName() {
        return apnName;
    }

    public void setApnName(String apnName) {
        this.apnName = apnName;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        switch (this.getCardType()) {
            case Constants.REQUEST_PARAM_MSISDN:
                stringBuilder.append("所查询的物联卡号码(MSISDN):").append(this.getCardNum()).append(",");
                break;
            case Constants.REQUEST_PARAM_ICCID:
                stringBuilder.append("集成电路卡识别码(ICCID):").append(this.getCardNum()).append(",");
                break;
            case Constants.REQUEST_PARAM_IMSI:
                stringBuilder.append("国际移动用户识别码(IMSI):").append(this.getCardNum()).append(",");
                break;
        }
        stringBuilder.append("APN名称:").append(apnName).append(",");
        if ("0".equals(this.getOperType())) {
            stringBuilder.append("操作类型:").append("开");
        } else if ("1".equals(this.getOperType())) {
            stringBuilder.append("操作类型:").append("停");
        }
        return stringBuilder.toString();
    }
}
